home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
satellit
/
im2gif
/
readme
< prev
next >
Wrap
Text File
|
1991-11-24
|
4KB
|
114 lines
UoSAT-5 to GIF tools
Version 2 (im files)
Disclaimer
There was no attempt to make these routines easily portable to anything.
They are for MS-DOS and Microsoft C.
There was no attempt to make these routines easily adaptable to other
raw CCD formats.
This stuff works on my system with the current image format, I'm sending
it out as is to help others get started. It isn't pretty, but there are
only so many hours in the day.
There was no attempt to optimize this for speed, other than the usual.
I suggest you use a big ramdisk and do the processing there. Using
a 1mb ramdisk and 2mb disk cache, on a 33MHz 486 it takes 10 seconds
to go from a imnnnn file to a displayed pic on the screen.
That said, here's what's what.
These programs take a raw imnnnn file as output from PHS. The format of
this file is described in inter.c, which originally came from UoSAT. There
has been the addition of a 256 byte header since the inter documentation was
done, but the current version of the source runs with the currect imnnnn
files. The output of the programs is a flat "raster" file suitable to
use as input to RG8, which will convert the file to .GIF.
The programs:
inter - merges the two fields into a single frame.
spec - attempts to remove the "speckles" from the image, reduce the
horizontal white bar, and reduce the following horizontal black
bar. (Anyone who comes up with a better way, which shouldn't
be too tough, is asked to send me the improved source).
clip - remove black bar from the left of the image.
header - display image header
The files:
CLIP.C Clip source and program
CLIP.EXE
CONVERT.BAT BAT file to do everything. Say "convert imnnnn", e.g.
phs 1b5.dl /x
convert im0070
HEADER.C display image header. Use on an imnnnn file, not a .dl
file.
HEADER.EXE
INTER.C Interleave program
INTER.EXE
SPEC.C speckle program
SPEC.EXE
STDPAL.PAL null palette file
README This file.
Convert explained
inter %1a %1b
Take the two halves of the file in 611 byte lines and
interleave, making 612 byte lines.
del %1a
spec %1b %1c 60
Remove speckles by looking for bytes that are more than 20
different that adjacent bytes. Too simple, but works well
for most images. Identifies white bar by looking for values
in the "black level" area that are greater than 60. If the
image has more than 6 white lines found, adjust the cutoff up,
80 usually works for me.
del %1b
clip %1c %1d 0 44
Remove leftmost 44 bytes on each line, making 568 byte lines.
del %1c
rg8 %1d. /c568 /r578 /ps
Convert raster to .GIF using 578 lines of 568 bytes. Use /r480
to get a file that fits in 640x480.
rg8 is shareware which was on UO-14 a while ago, described thus:
RG8.ARC/binary 01-Sep-88 14791 Accesses: 4
Keywords: GIF SATELLITE CONVERSION COLOR GREY FLEXIBLE FAST
Convert RIX (640x480) raw satellite data files to GIF in
Color or 64 shades of grey. Has options for interlace,
320x200 GIF, different raw data sizes, and palette loading
for color GIFs. Will do everything RG and VG did and a lot
more. Allows experimenting with color images. By Bob
Montgomery.
It is included here as rg8.zip